package com.light.sword

import net.sf.cglib.proxy.Enhancer


fun main() {
    val enhancer = Enhancer()
    enhancer.setSuperclass(Hello::class.java)
    // 回调方法的参数为代理类对象
    enhancer.setCallback(HelloProxy())
    // 增强过的目标类
    val enhancedHello = enhancer.create()
    enhancedHello as Hello
    enhancedHello.hello()
}
